<!DOCTYPE html>
<html lang="zxx">

<head>
    <meta charset="utf-8" />
    <meta http-equiv="x-ua-compatible" content="ie=edge" />
    <meta name="description" content="" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
    <title>NY·房屋租赁社区-房源类型</title>
    <link rel="shortcut icon" href="assets/img/favicon.png" type="img/png" />
    <link rel="stylesheet" href="assets/css/animate.min.css">
    <link rel="stylesheet" href="assets/css/bootstrap.min.css" />
    <link rel="stylesheet" href="assets/css/font-awesome.min.css" />
    <link rel="stylesheet" href="assets/css/flaticon.css" />
    <link rel="stylesheet" href="assets/fonts/flaticon/flaticon-2.css" />
    <link rel="stylesheet" href="assets/css/magnific-popup.css" />
    <link rel="stylesheet" href="assets/css/slick.css" />
    <link rel="stylesheet" href="assets/css/nice-select.css" />
    <link rel="stylesheet" href="assets/css/leaflet.css" />
    <link rel="stylesheet" href="assets/css/mapbox-gl.min.css" />
    <link rel="stylesheet" href="assets/css/bootstrap-datepicker.css" />
    <link rel="stylesheet" href="assets/css/default.css" />
    <link rel="stylesheet" href="assets/css/style.css" />
    <link rel="stylesheet" href="assets/css/alert.css">
</head>

<body>

<!-- 头部开始 -->
<div class="preloader d-flex align-items-center justify-content-center">
    <div class="cssload-container">
        <div class="cssload-loading"><i></i><i></i><i></i><i></i></div>
    </div>
</div>

<header class="header-absolute sticky-header">
    <div class="container container-custom-one">
        <div class="nav-container d-flex align-items-center justify-content-between">

            <div class="nav-menu d-lg-flex align-items-center">


                <div class="navbar-close">
                    <div class="cross-wrap"><span class="top"></span><span class="bottom"></span></div>
                </div>


                <div class="toggle">
                    <a href="#" id="offCanvasBtn"><i class="fal fa-bars"></i></a>
                </div>

                <div class="menu-items">
                    <ul>
                        <li>
                            <a href="index.html">主页</a>
                        </li>
                        <li>
                            <a href="apartment-grid.html">我要找房</a>
                        </li>
                        <li>
                            <a href="classification.html">房源类型</a>
                        </li>
                        <li>
                            <a href="places.html">地图找房</a>
                        </li>
                        <li><a href="news.html">社区文化</a>

                        </li>
                    </ul>
                </div>


                <div class="nav-pushed-item"></div>
            </div>


            <div class="site-logo">
                <a href="index.html"><img src="assets/img/logo.png" alt="Logo"></a>
            </div>


            <div class="nav-push-item">

                <div class="header-info d-lg-flex align-items-center">
                    <div class="item">
                        <i class="fal fa-phone"></i>
                        <span>联系我们</span>
                        <a href="tel:+90898787709">
                            <h5 class="title">+1565 5757 567</h5>
                        </a>
                    </div>
                    <div class="item">
                        <i class="fal fa-envelope"></i>
                        <span>客服邮箱</span>
                        <a href="mailto:info@webmail.com">
                            <h5 class="title">jiajia@webmail.com</h5>
                        </a>
                    </div>
                </div>
            </div>

            <div class="navbar-toggler">
                <span></span><span></span><span></span>
            </div>
        </div>
    </div>
</header>

<div class="offcanvas-wrapper">
    <div class="offcanvas-overly"></div>
    <div class="offcanvas-widget">
        <a href="#" class="offcanvas-close"><i class="fal fa-times"></i></a>
        <div class="widget search-widget">
            <h5 class="widget-title">搜 房</h5>
            <form>
                <input type="text" id="content1" placeholder="请输入关键词">
                <button type="button" id="search1"><i class="far fa-search"></i></button>
            </form>
        </div>

        <div class="widget about-widget">
            <h5 class="widget-title">关于我们</h5>
            <p>
                NYCONDOS APARTMENTS·房屋租赁社区简称NY·房屋租赁社区，隶属于河南省郑州市-郑州航空工业管理学院-佳佳有限公司。2021年成立于河南郑州，
                是由郑州航院佳佳有限公司与江苏南京欣媚投资管理有限公司联合成立的郑州住房租赁行业第一家合资企业，是专注于为追求
                丰富生活体验的城市精英租房群体服务的集中式长租公寓连锁运营商。NY·房屋租赁社区致力于为租房人群提供完备的公寓产品，
                打造温馨的文化社区，以多样化的社群场景，为有态度的租房一族带来花样生活。
            </p>
        </div>

        <div class="widget nav-widget">
            <h5 class="widget-title">浏览导航</h5>
            <ul>
                <li><a href="index.html">主页</a></li>
                <li>
                    <a href="trending.html">我要找房</a>
                </li>
                <li>
                    <a href="classification.html">房源类型</a>
                </li>
                <li>
                    <a href="places.html">地图找房</a>
                </li>
                <li>
                    <a href="news.html">社区文化</a>
                </li>
            </ul>
        </div>

        <div class="widget social-link">
            <h5 class="widget-title">联系我们</h5>
            <ul>
                <li><a href="#"><i class="fab fa-facebook-f"></i></a></li>
                <li><a href="#"><i class="fab fa-twitter"></i></a></li>
                <li><a href="#"><i class="fab fa-behance"></i></a></li>
                <li><a href="#"><i class="fab fa-linkedin"></i></a></li>
                <li><a href="#"><i class="fab fa-google"></i></a></li>
            </ul>
        </div>
    </div>
</div>
<!-- 头部结束 -->


<section class="breadcrumb-area" style="background-image: url(assets/img/bg/04.jpg);">
    <div class="container">
        <div class="breadcrumb-text">
            <span>NYCONDOS APARTMENTS</span>
            <h2 class="page-title">NY·房屋租赁社区</h2>

            <ul class="breadcrumb-nav">
                <li><a href="index.html">主页</a></li>
                <li class="active">房源类型</li>
            </ul>
        </div>
    </div>
</section>


    <section class="restaurant-tab-area pt-120 pb-90">
        <div class="container">
            <ul class="restaurant-rood-list row justify-content-center nav nav-pills mb-30" id="restaurant-tab"
                role="tablist">
                <li class="nav-item col-lg-2 col-md-3 col-sm-4 col-6">
                    <a class="nav-link" data-toggle="pill" id="type1" href="#chicken">
                        <input type="hidden" id="value1" value="1">
                        <i class="flaticon-duplex"></i>
                        <span class="title">复式</span>
                    </a>
                </li>
                <li class="nav-item col-lg-2 col-md-3 col-sm-4 col-6">
                    <a class="nav-link" data-toggle="pill" id="type2" href="#italian">
                        <input type="hidden" id="value2" value="2">
                        <i class="flaticon-medieval-house"></i>
                        <span class="title">别墅</span>
                    </a>
                </li>
                <li class="nav-item col-lg-2 col-md-3 col-sm-4 col-6">
                    <a class="nav-link" data-toggle="pill" id="type3" href="#coffee">
                        <input type="hidden" id="value3" value="3">
                        <i class="flaticon-condominium"></i>
                        <span class="title">园景房</span>
                    </a>
                </li>
                <li class="nav-item col-lg-2 col-md-3 col-sm-4 col-6">
                    <a class="nav-link" data-toggle="pill" id="type4" href="#bake-cake">
                        <input type="hidden" id="value4" value="4">
                        <i class="flaticon-residential"></i>
                        <span class="title">阁楼</span>
                    </a>
                </li>
                <li class="nav-item col-lg-2 col-md-3 col-sm-4 col-6">
                    <a class="nav-link" data-toggle="pill" id="type5" href="#cokkies">
                        <input type="hidden" id="value5" value="5">
                        <i class="flaticon-building"></i>
                        <span class="title">单元式</span>
                    </a>
                </li>
                <li class="nav-item col-lg-2 col-md-3 col-sm-4 col-6">
                    <a class="nav-link" data-toggle="pill" id="type6" href="#coctail">
                        <input type="hidden" id="value6" value="6">
                        <i class="flaticon-apartment"></i>
                        <span class="title">公寓式</span>
                    </a>
                </li>
            </ul>


            <div class="tab-pane fade" id="chicken" role="tabpanel">
                <div class="row" id="card1">

                </div>
            </div>


            <div class="tab-pane fade" id="italian" role="tabpanel">
                <div class="row" id="card2">

                </div>
            </div>


            <div class="tab-pane fade " id="coffee" role="tabpanel">
                <div class="row" id="card3">

                </div>
            </div>


            <div class="tab-pane fade " id="bake-cake" role="tabpanel">
                <div class="row" id="card4">

                </div>
            </div>


            <div class="tab-pane fade " id="cokkies" role="tabpanel">
                <div class="row" id="card5">

                </div>
            </div>


            <div class="tab-pane fade " id="coctail" role="tabpanel">
                <div class="row" id="card6">

                </div>
            </div>

        </div>
    </section>



    <section class="menu-area gradient-white pt-115 pb-115">
        <div class="container">
            <div class="section-title text-center mb-80">
                <span class="title-tag">猜你喜欢</span>
                <h2>精选房源</h2>
            </div>
            <div class="menu-loop">
                <div class="row justify-content-center">
                    <div class="col-lg-6 col-md-10" id="recommend1">

                        <!--<div class="single-menu-box wow fadeInUp" data-wow-delay=".3s">-->
                            <!--<div class="menu-img" style="background-image: url(assets/img/menu/01.jpg);">-->
                            <!--</div>-->
                            <!--<div class="menu-desc">-->
                                <!--<h4><a href="#">Eggs & Bacon</a></h4>-->
                                <!--<p>Lorem ipsum dolor sit amet, consectetur adip isicing elit, sed do eiusmod tempor.-->
                                <!--</p>-->
                                <!--<a href="#" class="menu-link"><i class="fal fa-long-arrow-right"></i></a>-->
                            <!--</div>-->
                        <!--</div>-->

                    </div>

                    <div class="col-lg-6 col-md-10" id="recommend2">

                    </div>


                </div>
            </div>
        </div>
    </section>


    <a href="#" class="back-to-top" id="backToTop">
        <i class="fal fa-angle-double-up"></i>
    </a>


<footer>

    <div class="copyright-area pt-20 pb-20">
        <div class="container">
            <div class="row align-items-center">
                <div class="col-md-5 order-2 order-md-1">
                    <p class="copyright-text">Copyright 安思佳©版权所有 2017-2021</p>
                </div>
                <div class="col-md-7 order-1 order-md-2">
                    <div class="social-links">
                        <a href="#"><i class="fab fa-facebook-f"></i></a>
                        <a href="#"><i class="fab fa-twitter"></i></a>
                        <a href="#"><i class="fab fa-behance"></i></a>
                        <a href="#"><i class="fab fa-linkedin"></i></a>
                        <a href="#"><i class="fab fa-youtube"></i></a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</footer>

    <script src="assets/js/vendor/modernizr-3.6.0.min.js"></script>
    <script src="assets/js/vendor/jquery-1.12.4.min.js"></script>
    <script src="assets/js/bootstrap.min.js"></script>
    <script src="assets/js/popper.min.js"></script>
    <script src="assets/js/slick.min.js"></script>
    <script src="assets/js/isotope.pkgd.min.js"></script>
    <script src="assets/js/jquery.magnific-popup.min.js"></script>
    <script src="assets/js/jquery.inview.min.js"></script>
    <script src="assets/js/jquery.countTo.js"></script>
    <script src="assets/js/jquery.nice-select.min.js"></script>
    <script src="assets/js/bootstrap-datepicker.js"></script>
    <script src="assets/js/wow.min.js"></script>
  	<script src="assets/js/leaflet.js"></script>
  	<script src="assets/js/mapbox-gl.min.js"></script>
  	<script src="assets/js/map.js"></script>
    <script src="assets/js/main.js"></script>
    <script src="assets/js/alert.js"></script>
    <script type="text/javascript">

        getRecommend();

        var lastElem = null;

        $("#type1").click(function () {
            var value = $("#value1").val();
            typeHouseRoom(value, $("#card1"));
        });

        $("#type2").click(function () {
            var value = $("#value2").val();
            typeHouseRoom(value, $("#card2"));
        });

        $("#type3").click(function () {
            var value = $("#value3").val();
            typeHouseRoom(value, $("#card3"));
        });

        $("#type4").click(function () {
            var value = $("#value4").val();
            typeHouseRoom(value, $("#card4"));
        });

        $("#type5").click(function () {
            var value = $("#value5").val();
            typeHouseRoom(value, $("#card5"));
        });

        $("#type6").click(function () {
            var value = $("#value6").val();
            typeHouseRoom(value, $("#card6"));
        });


        function typeHouseRoom(type, elem) {
            $.ajax({
                url: 'house-room/type',
                data: {
                    pageNum: 1,
                    pageSize: 8,
                    type: type
                },
                type: 'get',
                dataType: 'json',
                success: function (result) {
                    if (result.code == 200) {
                        if (lastElem != null) {
                            lastElem.html("");
                        }
                        elem.html("");
                        var category = "";
                        switch(type) {
                            case "1" :  category = "（复式）"; break;
                            case "2" : category = "（别墅）"; break;
                            case "3" : category = "（园景房）"; break;
                            case "4" : category = "（阁楼）"; break;
                            case "5" : category = "（单元式）"; break;
                            case "6" : category = "（公寓式）";
                        }

                        var houseRoomList = result.data.houseRoomList;
                        for (var i = 0; i < houseRoomList.length; i++) {
                            var item = houseRoomList[i];

                            elem.append("<div class=\"col-lg-3 col-6\">\n" +
                                "                        <div class=\"food-box\">\n" +
                                "                            <div class=\"thumb\">\n" +
                                "                                <img src=\""+ item.url +"\" alt=\"images\">\n" +
                                "                                <span class=\"price\">￥"+ item.price +"</span>\n" +
                                "                            </div>\n" +
                                "                            <div class=\"desc\">\n" +
                                "                                <a class=\"cat\">"+ category +"可住"+ item.live +"人</a>\n" +
                                "                                <h4>"+ item.name +"</h4>\n" +
                                "                                <a href='javascript:void(0);' onclick='getDetail("+ item.id +")' class=\"link\"><i class=\"fal fa-arrow-right\"></i></a>\n" +
                                "                            </div>\n" +
                                "                        </div>\n" +
                                "                    </div>");
                        }

                        lastElem = elem;
                    }
                }
            });
        };



        function getDetail(roomId) {
            location.href='apartment-details.html?roomId=' + roomId;
        }


        function getRecommend() {
            $("#recommend").html("");

            $.ajax({
                url: 'house-room-recommend/list',
                type: 'get',
                dataType: 'json',
                success: function (result) {
                    if (result.code == 200) {
                        var recommendList = result.data;
                        var size = 0;
                        if (recommendList.length%2 == 0) {
                            size = recommendList.length / 2;
                        }else {
                            size =  Math.ceil(recommendList.length / 2);
                        }

                        for (var i = 0; i < size; i++) {
                            recommendAppend($("#recommend1"), recommendList[i]);
                        }

                        for (var i = size; i < recommendList.length; i++) {
                            recommendAppend( $("#recommend2"), recommendList[i]);
                        }
                    }
                }
            });
        }

        function recommendAppend(elem, item) {
            elem.append("<div class=\"single-menu-box wow fadeInUp\" data-wow-delay=\"."+item.seconds+"s\">\n" +
                "                            <div class=\"menu-img\" style=\"background-image: url("+ item.url +");\">\n" +
                "                            </div>\n" +
                "                            <div class=\"menu-desc\">\n" +
                "                                <h4><a href=\"#\">"+ item.name +"</a></h4>\n" +
                "                                <p>"+ item.introduce +"</p>\n" +
                "                                <a href='javascript:void(0);' onclick='getDetail("+ item.id +")' class=\"menu-link\"><i class=\"fal fa-long-arrow-right\"></i></a>\n" +
                "                            </div>\n" +
                "                        </div>");
        }

        $("#search1").click(function () {
            $.ajax({
                url: 'house-room/list',
                data: {
                    pageNum : 1,
                    pageSize : 1,
                    content: $("#content1").val()
                },
                type: 'get',
                dataType: 'json',
                success: function (result) {
                    if (result.code == 200) {
                        var houseRoomList = result.data.houseRoomList;
                        if (houseRoomList.length == 0) {
                            alert("抱歉！未搜索到合适房源，请重新搜索！");
                        }else {
                            location.href = 'apartment-grid.html?search=true&content=' + encodeURI(encodeURI($("#content1").val()));
                        }
                    }
                }
            });
        });

    </script>
</body>

</html>
